﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="ViewAlbum.aspx.vb" Inherits="BeachesInGreeceComplete.ViewAlbum" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<h2>My Album</h2>
<asp:ListView ID="ListView1" runat="server" DataKeyNames="ID"
            DataSourceID="SqlDataSource1">
            <ItemTemplate>
                <li class="hoverClass">
                    <asp:Label ID="lbl_Name" CssClass="BeachNameLabel" runat="server" Text='<%# Eval("Location") %>' />
                    <br />
                                                                                    
                    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("ID", "ViewFullAlbumPicture.aspx?ID={0}") %>'>
                        <img src='<%# Eval("Thumbnail") %>'  alt="No picture found"  width="100" height="100" style="border-style: solid; border-width: medium" />
                    </asp:HyperLink>
                    <br />
                   <asp:Label ID="lbl_Region" CssClass="RegionLabel" runat="server" Text='<%# Eval("Description") %>' />
                    <br />
                    <br />
                    </li>
              </ItemTemplate>
              <LayoutTemplate>
                <ul class="ItemContainer">
                    <li runat="server" id="itemPlaceholder" />
                </ul>
            </LayoutTemplate>
        </asp:ListView>
        
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:BeachConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:BeachConnectionString.ProviderName %>" 
        SelectCommand="SELECT [ID], [Albums_FK], [Thumbnail], [Description], [Location] FROM [Album_Photos] WHERE ([Albums_FK] = ?)"><SelectParameters><asp:QueryStringParameter 
                Name="Albums_FK" QueryStringField="ID" Type="Int32" /></SelectParameters></asp:SqlDataSource></asp:Content>
